package org.sistemafinanciero.entity;

// Generated 02-may-2014 11:48:28 by Hibernate Tools 4.0.0

import java.math.BigInteger;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;

/**
 * DetalleHistorialCaja generated by hbm2java
 */
@Entity
@Table(name = "DETALLE_HISTORIAL_CAJA", schema = "BDSISTEMAFINANCIERO")
public class DetalleHistorialCaja implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private BigInteger idDetalleHistorialCaja;
	private MonedaDenominacion monedaDenominacion;
	private HistorialCaja historialCaja;
	private BigInteger cantidad;

	public DetalleHistorialCaja() {

	}

	public DetalleHistorialCaja(BigInteger idDetalleHistorialCaja, MonedaDenominacion monedaDenominacion, HistorialCaja historialCaja, BigInteger cantidad) {
		this.monedaDenominacion = monedaDenominacion;
		this.cantidad = cantidad;
		this.idDetalleHistorialCaja = idDetalleHistorialCaja;
		this.historialCaja = historialCaja;
	}

	@GeneratedValue(strategy = GenerationType.AUTO)
	@Id
	@Column(name = "ID_DETALLE_HISTORIAL_CAJA", unique = true, nullable = false, updatable = false, insertable = false, columnDefinition = "NUMBER")
	public BigInteger getIdDetalleHistorialCaja() {
		return this.idDetalleHistorialCaja;
	}

	public void setIdDetalleHistorialCaja(BigInteger idDetalleHistorialCaja) {
		this.idDetalleHistorialCaja = idDetalleHistorialCaja;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_MONEDA_DENOMINACION", nullable = false)
	public MonedaDenominacion getMonedaDenominacion() {
		return this.monedaDenominacion;
	}

	public void setMonedaDenominacion(MonedaDenominacion monedaDenominacion) {
		this.monedaDenominacion = monedaDenominacion;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_HISTORIAL_CAJA", nullable = false)
	public HistorialCaja getHistorialCaja() {
		return this.historialCaja;
	}

	public void setHistorialCaja(HistorialCaja historialCaja) {
		this.historialCaja = historialCaja;
	}

	@NotNull
	@DecimalMin(value = "0")
	@Column(name = "CANTIDAD", nullable = false, precision = 22, scale = 0)
	public BigInteger getCantidad() {
		return this.cantidad;
	}

	public void setCantidad(BigInteger cantidad) {
		this.cantidad = cantidad;
	}

}
